package com.wanxi.controller.front;

import com.alibaba.fastjson2.JSONObject;
import com.wanxi.dto.ResultDTO;
import com.wanxi.service.NewsTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController("newsType")
@CrossOrigin(origins = "http://localhost:8081")
@RequestMapping("/newsType")
public class NewsTypeController {
    @Autowired
    NewsTypeService newsTypeService;

    @GetMapping("/find")
    public ResultDTO findEnableNewsType(){
        return newsTypeService.findNewsType();
    }
}
